home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v10n22.arc
/
NUMSTR.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-12-08
|
358b
|
19 lines
THE NUM2STR$ FUNCTION
COMPLETE LISTING
DECLARE FUNCTION Num2Str$ (Value&)
INPUT "Enter the number of pennies: ", Pennies&
PRINT Num2Str$(Pennies&)
FUNCTION Num2Str$ (Pennies&) STATIC
Dollars& = Pennies& \ 100
Cents% = Pennies& MOD 100
Num2Str$ = STR$(Dollars&) + "." + _
RIGHT$("0" + LTRIM$(STR$(Cents%)), 2)
END FUNCTION